- connect
NetConnectStatus connect(NetIPAddress ip, void delegate(INetwork) onConnect, uint id)
- disconnect
void disconnect()
Undocumented in source.
- freeBuffer
void freeBuffer(NetBuffer* buffer)
Make that buffer available inside the buffer pool and saves memory
- getCompletedBuffer
NetBuffer* getCompletedBuffer()
WARNING: It is important to call freeBuffer at some time since getting the buffer won't remove it from the queue
This function must only be called after getData() returns true.
- getConnectInfo
NetConnectInfo getConnectInfo()
Undocumented in source.
- getConnectionSelfID
uint getConnectionSelfID()
Gets ID for that network connection. It can't change over its lifetime
- getData
bool getData()
Returns if there is any data available to take
- getNetInterfaceType
NetInterface getNetInterfaceType()
Undocumented in source.
- isConnected
bool isConnected()
Undocumented in source. Be warned that the author may not have intended to support it.
- isHost
bool isHost()
Undocumented in source.
- sendData
void sendData(T data)
Due to performance reasons, toNetworkBytes and toBytes needs to be in api instead of back implementation.
This allows to use non-allocating memory when sending data.
Keep in mind that the data is converted to big endian before being sent.
- sendDataRaw
void sendDataRaw(ubyte[] data)
Sends the data without modifying it further. It is called like that since it will be able to overload with templates
- sendDataToServer
void sendDataToServer(T data)
Undocumented in source. Be warned that the author may not have intended to support it.
- status
NetConnectStatus status()
Returns whether it has got any data
- targetConnectionID
void targetConnectionID(uint id)
Sets that network connection connected to the specified ID
- targetConnectionID
uint targetConnectionID()
Undocumented in source.
- withServerTarget
void withServerTarget(void delegate() dg)
Undocumented in source. Be warned that the author may not have intended to support it.
Implementation currently follows at hip.network